import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
// bom: base: stapAndPrice
// 
export function getBaseList(query) {
  return request({
    url: '/bom/base/stapAndPrice',
    method: 'get',
    params: query
  })
}
// "bom:food:foodAndPric e
export function getfoodAndPrice(query) {
  // console.log(query);
  return request({
    url: '/bom/food/foodAndPrice',
    method: 'get',
    params: query
  })
}
//获取分类列表
export function getfoodType(query) {
  // console.log(query);
  return request({
    url: '/bom/foodCategory/list',
    method: 'get',
    params: query
  })
}
// bom:foodCategory:updateFlag
export function getfoodCategory(query) {
  // console.log(query);
  return request({
    url: '/bom/foodCategory/updateFlag',
    method: 'post',
    data: query
  })
}
// bom:price:findPriceByStapCode
export function findPriceByStapCode(query) {
  // console.log(query);
  return request({
    url: '/bom/price/findPriceByStapCode',
    method: 'get',
    params: query
  })
}
export function EditPriceByStapCode(query) {
  // console.log(query);
  return request({
    url: '/bom/price/updateInitPrice',
    method: 'post',
    data: query
  })
}
// pandian:pandianPeriod:list
export function getpandianPeriod(query) {
  return request({
    url: '/pandian/pandianPeriod/pcList',
    method: 'get',
    params: query
  })
}
// bom:base:query
export function addBaseQuery(query) {
  return request({
    url: '/bom/price/' + query,
    method: 'get',
    // params: query
  })
}
//盘点关账   /pandian/pandianPeriod/editAssociationConfirmPanDian/{id}
export function closeBill(query) {
  return request({
    url: '/pandian/pandianPeriod/editAssociationConfirmPanDian/' + query,
    method: 'post',
    // params: query
  })
}
//更新菜品分类  bom:foodCategory:import
export function foodCategoryimport(query) {
  return request({
    url: '/bom/foodCategory/import',
    method: 'post',
    params: query
  })
}

export function enableShop(query) {
  return request({
    url: '/bom/dept/enableShop',
    method: 'get',
    params: query
  })
}

// 更新菜品数据
export function updateFood(query) {
  return request({
    url: 'bom/food/update',
    method: 'get',
    params: query
  })
}
// 更新菜品数据
export function updateAllFood(query) {
  return request({
    url: 'bom/food/updateAll',
    method: 'get',
    params: query
  })
}
// bom:food:setIsOpen"
export function setIs0pen(query) {
  return request({
    url: 'bom/food/setIsOpen/' + query,
    method: 'get',
    params: query
  })
}